package com.villaday.idf.model2;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class ShippingAddressesEntity {


    /**
     * code : 200
     * status : success
     * msg : success
     * body : [{"address":"老家的是我的是我的是我的是我的是","code":"737014929!1714576081!753534535!479345260","id":"edGakqwnoUQA5wLz","linkman":"食发鬼","mobile":"13632845665","overlayMobile":"136****5665","preferred":true,"region":"海南三亚三亚市"}]
     */

    private String code;
    private String status;
    private String msg;
    private List<BodyEntity> body;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<BodyEntity> getBody() {
        return body;
    }

    public void setBody(List<BodyEntity> body) {
        this.body = body;
    }

    public static class BodyEntity implements Parcelable {
        /**
         * address : 老家的是我的是我的是我的是我的是
         * code : 737014929!1714576081!753534535!479345260
         * id : edGakqwnoUQA5wLz
         * linkman : 食发鬼
         * mobile : 13632845665
         * overlayMobile : 136****5665
         * preferred : true
         * region : 海南三亚三亚市
         */

        private String address;
        private String code;
        private String id;
        private String linkman;
        private String mobile;
        private String overlayMobile;
        private boolean preferred;
        private String region;

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getLinkman() {
            return linkman;
        }

        public void setLinkman(String linkman) {
            this.linkman = linkman;
        }

        public String getMobile() {
            return mobile;
        }

        public void setMobile(String mobile) {
            this.mobile = mobile;
        }

        public String getOverlayMobile() {
            return overlayMobile;
        }

        public void setOverlayMobile(String overlayMobile) {
            this.overlayMobile = overlayMobile;
        }

        public boolean isPreferred() {
            return preferred;
        }

        public void setPreferred(boolean preferred) {
            this.preferred = preferred;
        }

        public String getRegion() {
            return region;
        }

        public void setRegion(String region) {
            this.region = region;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.address);
            dest.writeString(this.code);
            dest.writeString(this.id);
            dest.writeString(this.linkman);
            dest.writeString(this.mobile);
            dest.writeString(this.overlayMobile);
            dest.writeByte(this.preferred ? (byte) 1 : (byte) 0);
            dest.writeString(this.region);
        }

        public BodyEntity() {
        }

        protected BodyEntity(Parcel in) {
            this.address = in.readString();
            this.code = in.readString();
            this.id = in.readString();
            this.linkman = in.readString();
            this.mobile = in.readString();
            this.overlayMobile = in.readString();
            this.preferred = in.readByte() != 0;
            this.region = in.readString();
        }

        public static final Parcelable.Creator<BodyEntity> CREATOR = new Parcelable.Creator<BodyEntity>() {
            @Override
            public BodyEntity createFromParcel(Parcel source) {
                return new BodyEntity(source);
            }

            @Override
            public BodyEntity[] newArray(int size) {
                return new BodyEntity[size];
            }
        };
    }
}
